<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <ul @click="handleUl">
            <li @click.stop="handleLi">xxxxxxx</li>
        </ul>
        <ul>
            <li><a href="https://www.baidu.com" @click.prevent="handleA">xxxxxxx</a></li>
        </ul>
        <input type="text" @keyup.13="onEnter" v-model="msg">
    </div>
    <script src="./js/vue.js"></script>
    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                msg: "牛逼plus"
            },
            methods: {
                handleUl() {
                    alert("ul");
                },
                handleLi() {
                    alert("li");
                },
                onEnter() {
                    alert("哈哈");
                }
            }
        });
    </script>
</body>

</html>